/*
 * MainWindow.cpp
 *
 *  Created on: 09.09.2012
 *      Author: andrew
 */

#include "MainWindow.h"

MainWindow::MainWindow()
{
	//General setup
	set_title("JackAudio Instrument Rack");
	set_size_request(640, 480);
	set_border_width(10);
	
	Glib::RefPtr<Gtk::Builder> builder = Gtk::Builder::create_from_file("Interface.glade");
	
	Gtk::Notebook *pPages = 0;
	builder->get_widget("Pages", pPages);
	add(*pPages);
	
	//init pages
	pPages->set_current_page(0);
	Gtk::Toolbar *pRackBar = 0;
	builder->get_widget("RackToolbar", pRackBar);	
	Gtk::ToolButton *pBtn = new Gtk::ToolButton(*(new Gtk::Image("images/Add.png")), "New");
	pBtn->signal_clicked().connect(sigc::mem_fun(*this, &MainWindow::on_rack_new_clicked));
	pRackBar->add(*pBtn);	
	//show first log message
	builder->get_widget("LogView", pLogView);
	pLogList = new Gtk::ListViewText(1, false);
	pLogList->TreeView(pLogView);
	
	
	show_all_children(true);
	
	

}

MainWindow::~MainWindow()
{
	// TODO Auto-generated destructor stub
}

void MainWindow::on_rack_new_clicked()
{
	
}
